Amplify.configure({
Analytics: {
// - disable Analytics if true
disabled: false,
// (optional) - Allow recording session events. Default is true.
autoSessionRecord: true,
AWSPinpoint: {
// (optional) - Amazon Pinpoint App Client ID
appId: 'XXXXXXXXXXabcdefghij1234567890ab',
// (optional) - Amazon service region
region: 'XX-XXXX-X',
// (optional) - Customized endpoint
endpointId: 'XXXXXXXXXXXX',
// (optional) - Default Endpoint Information
endpoint: {
address: 'xxxxxxx', // The unique identifier for the recipient. For example, an address could be a device token, email address, or mobile phone number.
attributes: {
// Custom attributes that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create a segment.
hobbies: ['piano', 'hiking']
},
channelType: 'APNS', // The channel type. Valid values: APNS, GCM
demographic: {
appVersion: 'xxxxxxx', // The version of the application associated with the endpoint.
locale: 'xxxxxx', // The endpoint locale in the following format: The ISO 639-1 alpha-2 code, followed by an underscore, followed by an ISO 3166-1 alpha-2 value
make: 'xxxxxx', // The manufacturer of the endpoint device, such as Apple or Samsung.
model: 'xxxxxx', // The model name or number of the endpoint device, such as iPhone.
modelVersion: 'xxxxxx', // The model version of the endpoint device.
platform: 'xxxxxx', // The platform of the endpoint device, such as iOS or Android.
platformVersion: 'xxxxxx', // The platform version of the endpoint device.
timezone: 'xxxxxx' // The timezone of the endpoint. Specified as a tz database value, such as Americas/Los_Angeles.
},
location: {
city: 'xxxxxx', // The city where the endpoint is located.
country: 'xxxxxx', // The two-letter code for the country or region of the endpoint. Specified as an ISO 3166-1 alpha-2 code, such as ;US; for the United States.
latitude: 0, // The latitude of the endpoint location, rounded to one decimal place.
longitude: 0, // The longitude of the endpoint location, rounded to one decimal place.
postalCode: 'xxxxxx', // The postal code or zip code of the endpoint.
region: 'xxxxxx' // The region of the endpoint location. For example, in the United States, this corresponds to a state.
},
metrics: {
// Custom metrics that your app reports to Amazon Pinpoint.
},
/** Indicates whether a user has opted out of receiving messages with one of the following values:
* ALL - User has opted out of all messages.
* NONE - Users has not opted out and receives all messages.
*/
optOut: 'ALL',
// Customized userId
userId: 'XXXXXXXXXXXX',
// User attributes
userAttributes: {
interests: ['football', 'basketball', 'AWS']
// ...
}
},
// Buffer settings used for reporting analytics events.
// (optional) - The buffer size for events in number of items.
bufferSize: 1000,
// (optional) - The interval in milliseconds to perform a buffer check and flush if necessary.
flushInterval: 5000, // 5s
// (optional) - The number of events to be deleted from the buffer when flushed.
flushSize: 100,
// (optional) - The limit for failed recording retries.
resendLimit: 5
}
}
}); 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172Amplify.configure({
Analytics: {
// - disable Analytics if true
disabled: false,
// (optional) - Allow recording session events. Default is true.
autoSessionRecord: true,
AWSPinpoint: {
// (optional) - Amazon Pinpoint App Client ID
appId: 'XXXXXXXXXXabcdefghij1234567890ab',
// (optional) - Amazon service region
region: 'XX-XXXX-X',
// (optional) - Customized endpoint
endpointId: 'XXXXXXXXXXXX',
// (optional) - Default Endpoint Information
endpoint: {
address: 'xxxxxxx', // The unique identifier for the recipient. For example, an address could be a device token, email address, or mobile phone number.
attributes: {
// Custom attributes that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create a segment.
hobbies: ['piano', 'hiking']
},
channelType: 'APNS', // The channel type. Valid values: APNS, GCM
demographic: {
appVersion: 'xxxxxxx', // The version of the application associated with the endpoint.
locale: 'xxxxxx', // The endpoint locale in the following format: The ISO 639-1 alpha-2 code, followed by an underscore, followed by an ISO 3166-1 alpha-2 value
make: 'xxxxxx', // The manufacturer of the endpoint device, such as Apple or Samsung.
model: 'xxxxxx', // The model name or number of the endpoint device, such as iPhone.
modelVersion: 'xxxxxx', // The model version of the endpoint device.
platform: 'xxxxxx', // The platform of the endpoint device, such as iOS or Android.
platformVersion: 'xxxxxx', // The platform version of the endpoint device.
timezone: 'xxxxxx' // The timezone of the endpoint. Specified as a tz database value, such as Americas/Los_Angeles.
},
location: {
city: 'xxxxxx', // The city where the endpoint is located.
country: 'xxxxxx', // The two-letter code for the country or region of the endpoint. Specified as an ISO 3166-1 alpha-2 code, such as "US" for the United States.
latitude: 0, // The latitude of the endpoint location, rounded to one decimal place.
longitude: 0, // The longitude of the endpoint location, rounded to one decimal place.
postalCode: 'xxxxxx', // The postal code or zip code of the endpoint.
region: 'xxxxxx' // The region of the endpoint location. For example, in the United States, this corresponds to a state.
},
metrics: {
// Custom metrics that your app reports to Amazon Pinpoint.
},
/** Indicates whether a user has opted out of receiving messages with one of the following values:
* ALL - User has opted out of all messages.
* NONE - Users has not opted out and receives all messages.
*/
optOut: 'ALL',
// Customized userId
userId: 'XXXXXXXXXXXX',
// User attributes
userAttributes: {
interests: ['football', 'basketball', 'AWS']
// ...
}
},
// Buffer settings used for reporting analytics events.
// (optional) - The buffer size for events in number of items.
bufferSize: 1000,
// (optional) - The interval in milliseconds to perform a buffer check and flush if necessary.
flushInterval: 5000, // 5s
// (optional) - The number of events to be deleted from the buffer when flushed.
flushSize: 100,
// (optional) - The limit for failed recording retries.
resendLimit: 5
}
}
});
|